Using an in situ stress measurement technique which measures stress as a function of annealing temperature, we have investigated the effect of phosphorous and boron doping of silicon dioxide glass films deposited by low-pressure chemical vapor deposition (LPCVD) and plasma-enhanced chemical vapor deposition (PECVD). The stress at room temperature is σi. Upon heating, it increases to a maximum, σm, corresponding to a temperature Tm, above which the stress is reduced to zero at a temperature T0. All these parameters plus the expansion coefficient are dependent on dopant concentrations and deposition technique.